<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-salary-edit" th:object="${salary}">
        <input id="taskId" name="taskId" th:value="${taskId}" type="hidden">
        <input id="salaryId" name="salaryId" th:field="*{salaryId}" type="hidden">
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">变动用户：</label>
                <div class="col-sm-8">
                    <input id="userId" name="userId" th:field="*{userId}" type="hidden">
                    <input id="userName" name="userName" class="form-control" onclick="selectDeptTree()" th:field="*{userName}" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">归属部门：</label>
                <div class="col-sm-8">
                    <input type="hidden" name="officeId" id="officeId">
                    <input id="officeName" name="officeName" th:field="*{officeName}" class="form-control" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">岗位：</label>
                <div class="col-sm-8">
                    <select id="post" name="post" class="form-control select2-hidden-accessible" readonly>
                        <option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:selected="${post.flag}" th:disabled="${post.status == '1'}"></option>
                    </select>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">用户性别：</label>
                <div class="col-sm-8">
                    <select name="sex" id="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}" readonly>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
                    </select>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">学历：</label>
                <div class="col-sm-8">
                    <input id="edu" name="edu" th:field="*{edu}" class="form-control" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">调整原因：</label>
                <div class="col-sm-8">
                    <input id="content" name="content" th:field="*{content}" class="form-control" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">现行标准 薪酬档级：</label>
                <div class="col-sm-8">
                    <input id="olda" name="olda" th:field="*{olda}" class="form-control" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">调整后标准 薪酬档级：</label>
                <div class="col-sm-8">
                    <input id="newa" name="newa" th:field="*{newa}" class="form-control" type="text">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">现行标准 月工资额：</label>
                <div class="col-sm-8">
                    <input id="oldb" name="oldb" th:field="*{oldb}" class="form-control" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">调整后标准 月工资额：</label>
                <div class="col-sm-8">
                    <input id="newb" name="newb" th:field="*{newb}" class="form-control" type="text">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">现行标准 年薪总额：</label>
                <div class="col-sm-8">
                    <input id="oldc" name="oldc" th:field="*{oldc}" class="form-control" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">调整后标准 年薪总额：</label>
                <div class="col-sm-8">
                    <input id="newc" name="newc" th:field="*{newc}" class="form-control" type="text">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">执行时间：</label>
                <div class="col-sm-8">
                    <input id="exeDate" name="exeDate" th:field="*{exeDate}" class="form-control" type="text">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">月增资：</label>
                <div class="col-sm-8">
                    <input id="addNum" name="addNum" th:field="*{addNum}" class="form-control" type="text">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">人力资源部门意见：</label>
                <div class="col-sm-8">
                    <input id="hrText" name="hrText" th:field="*{hrText}" class="form-control" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">分管领导意见：</label>
                <div class="col-sm-8">
                    <input id="leadText" name="leadText" th:field="*{leadText}" class="form-control" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">集团主要领导意见：</label>
                <div class="col-sm-8">
                    <input id="mainLeadText" name="mainLeadText" th:field="*{mainLeadText}" class="form-control" type="text" readonly>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">流程编号：</label>
                <div class="col-sm-8">
                    <input id="processId" name="processId" th:field="*{processId}" class="form-control" type="text">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-sm-3">您的意见:</label>
                <div class="col-sm-8">
                    <textarea name="taskComment" id="taskComment" class="form-control" th:field="*{taskComment}"></textarea>
                </div>
            </div>
        </div>
        <input id="taskPass" name="taskPass" class="hidden">
        <div class="form-group">
            <div class="col-sm-8 col-sm-offset-3">
                <button type="submit" class="btn btn-primary" onclick="$('#taskPass').val('1')">提交
                </button>
                <button type="submit" class="btn btn-warning" onclick="$('#taskPass').val('0')">退回
                </button>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "activiti/salary"
    $("#form-salary-edit").validate({
        rules: {
            userId: {
                required: true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-salary-edit').serialize());
        }
    }
</script>
</body>
</html>